package com.bingo.datasecurity.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.bingo.datasecurity.entity.po.AccountPo;
import com.bingo.datasecurity.mapper.AccountMapper;
import com.bingo.datasecurity.service.AccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author bingo
 * @date 2024/2/5 16:33
 */
@Service
public class AccountServiceImpl implements AccountService {


    @Resource
    private AccountMapper accountMapper;

    @Override
    public void addAccount(AccountPo accountPo) {
        accountMapper.insert(accountPo);
    }

    @Override
    public List<AccountPo> queryAllAccount() {
        return accountMapper.selectList(Wrappers.emptyWrapper());
    }

    @Override
    public void updatePasswordByAccount(String account, String password) {
        accountMapper.updatePasswordByAccount(account, password);
    }
}
